package com.example.cloud.consume.order.feign.service;

import com.example.cloud.entities.entity.Payment;
import com.example.cloud.entities.utils.SimpleMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 支付微服务接口调用
 *
 * @author Frank
 * @create 2020-11-30 16:08
 **/
@Component
@FeignClient(value = "CLOUD-PROVIDER-PAYMENT")
@RequestMapping("/payment")
public interface PaymentFeignService {

    /**
     * 查询详情
     * @param id 主键id
     * @return
     */
    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public SimpleMessage<Payment> findOne(@PathVariable(value = "id") long id);

}
